import groovy.sql.Sql

class PoliticManageService {

    def politicIndexService
    javax.sql.DataSource dataSource
    
    /**
     * import content from sql table
     */
    def importContent() {
        def sql = new Sql(dataSource)
        sql.eachRow("select * from import_politic"){ row ->
            politicIndexService.index(row.name, row.url, row.content)
        }
    }

}